<?php
class NumberCard extends BaseCard
{
	function NumberCard($color,$no)
	{
		$this->color = $color;
		$this->no = $no;
	}

	function equal($state)
	{
		return (($state->type != WildDraw && $state->type != Draw2) || $state->punished) && ($this->color == $state->color || $this->no == $state->no);
	}

	function overlay($state)
	{
		$state->punished = false;
		
		$state->color = $this->color;
		$state->no = $this->no;
		$state->type = $this->type;
	}
}